<div class="layui-container">
    <div class="layui-row">
        <div class="layui-col-sm12 layui-col-md12 layui-col-lg12">
			<div class="widget-head">
				<div class="widget-title">工人</div>
			</div>
			<div class="layui-col-md12 layui-col-xs12 widget-body ">
				<div class="layui-form-item">
					<form class="layui-form" method="post" action="">
						<input type="hidden" name="s" value="/{$request->pathinfo()}">
						<div class="layui-col-sm12 layui-col-md12">
							<div class="layui">
								<div class="layui-col-md3">
									<label class="layui-form-label">设计师姓名：</label>
									<div class="layui-col-md6 ">
										<input type="text" class="layui-input" name="name" placeholder="请输入工人姓名" value="{$request->get('name')}">
									</div>
								</div>
								<div class="layui-col-md2">
									<button class="layui-btn" lay-submit lay-filter="formDemo">搜索</button>
								</div>
								<div class="layui-col-md1">
									<a class="layui-btn"  href="{:url('renovation/addgongren')}"> <i class="mdi menu-icon mdi-plus"></i>新增</a>
								</div>
								<!--<div class="layui-form-item3">
									<div class="layui-col-md1">
										<a class="layui-btn"  href="{:url('renovation/gongdiadd')}"> <i class="mdi menu-icon mdi-plus"></i>新增</a>
									</div>
								</div>-->
							</div>
						</div>

					</form>
				</div>

				<div class="layui-col-md12" >
					<table width="100%" class="layui-table">
						<thead>
						<tr>
							<th>ID</th>
							<th width="20%">工人姓名</th>
							<th>图片</th>
							<th>添加时间</th>
							<th>操作</th>
						</tr>
						</thead>
						<tbody>
						{if count($list)>0}{foreach $list as $item}
							<tr>
								<td>{$item['merchant_tuandui_id']}</td>
								<td>{$item['merchant_name']}</td>
								<td>
									{if !empty($item['logo'])}
									<img src="/uploads/{$item['logo']}.jpg" width="100">
									{/if}
								</td>
								<td>{:date('Y-m-d H:i',$item['create_time'])}</td>
								<td>
									<div class="tpl-table-black-operation">
										<a href="javascript:;" class="item-delete tpl-table-black-operation-del"
										   data-id="{$item['merchant_tuandui_id']}">
											<i class="mdi menu-icon mdi-delete-forever"></i> 删除
										</a>
									</div>
								</td>
							</tr>
							{/foreach}{else/}
							<tr>
								<td colspan="12" class="layer-text-center">暂无记录</td>
							</tr>
						{/if}
						</tbody>
					</table>
				</div>
				<div class="layui-col-lg12">
					<div class="layui-fr">{$list|raw}</div>
					<div class="layui-fr pagination-total layer-margin-right">
						<div class="layer-vertical-align-middle">总记录：{$list->total()}</div>
					</div>
				</div>
			</div>
        </div>
    </div>
</div>
<script>
    $(function () {
		 $('.j-state')._get('goods_id', "{:url('renovation/updatestate')}",'');
        // 删除元素
        $('.item-delete').delete('id', "{:url('renovation/shejisdelete')}",'','Item');

    });

</script>

